<template>
    <div>
        <el-container class="form-container">
            <el-card class="box-card" shadow="never">
                <div slot="header" class="clearfix">
                    <span>参数管理</span>
                    <el-button type="primary" size="mini" style="float:right;padding: 6px 9px;" @click="handlerSubmitForm">保存</el-button>
                </div>
                <div >
                   <el-form  :rules="rules"  ref="form"   :model="form" size="small" label-width="120px">
                        <el-row>
                          <el-col :span="12">
                            <el-form-item  label="参数名称"  prop="fdName">
                                <el-input class="input" v-model="form.fdName"  ></el-input>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item  label="参数值" prop="fdValue">
                                <el-input class="input" v-model="form.fdValue" ></el-input>
                            </el-form-item>
                          </el-col>
                        </el-row>
                        <el-row>
                        <el-col :span="12">
                            <el-form-item  label="是否系统内置" prop="fdIsSystem">
                                <el-switch v-model="form.fdIsSystem" />
                            </el-form-item>
                        </el-col>
                        </el-row>
                        <el-row>
                          <el-col :span="24">
                            <el-form-item  label="备注"  prop="fdRemark" >
                                <el-input type="textarea" class="input" :rows="4" v-model="form.fdRemark" style="width:95%" ></el-input>
                            </el-form-item>
                          </el-col>
                        </el-row>
                   </el-form>
                </div>
            </el-card>
        </el-container>
    </div>
</template>
<script>
import {edit} from '@/components/mixins/form'
export default {
    name: "sysConfigMainAdd",
    data() {
        return {
            updateUrl:'/api/sys/config/sys_config_main',
            fetchUrl:'/api/sys/config/sys_config_main',
            form: {
                fdId:'',
                fdCreateTime:'',
                fdIsSystem:true,
                fdName:'',
                fdValue:'',
                fdRemark:''
            },
            rules:{
                fdName :[{required: true, message: '请输入参数名称', trigger: 'blur'}],
                fdValue :[{required: true, message: '请输入参数值', trigger: 'blur'}]
	        }
        }
    },
    mixins:[edit]
}
</script>
<style scoped >
@import "~@/assets/css/form.css";
</style>